#include <CommandPaste.h>
Inheritance diagram for CommandPaste:

Public Member Functions | |
| CommandPaste (osg::Vec3 pos, OSGWindows *osgwind) | |
| bool | execute () |
| bool | unexecute () |
Private Attributes | |
| OSGWindows * | osgwind_ |
| TrafficSign * | sign |
| TrafficLight * | light |
| Vehicle * | vehicle |
| EnvironmentObject * | envObj |
| vector< TraffEduObject * > | pastedObjs_ |
| vector< TraffEduObject * > | tmpObjs_ |
| char | whichVector |
Definition at line 7 of file CommandPaste.h.
|
||||||||||||
|
A constructor. Initializes osgwind_ and creates the pasted objects.
Definition at line 2 of file CommandPaste.cpp. References OSGWindows::addObject(), OSGWindows::getCopiedObjects(), OSGWindows::getCutObjects(), TraffEduObject::getObjectGroup(), osgwind, osgwind_, pastedObjs_, TraffEduObject::setPosition(), TraffEduObject::setScale(), sign, SIGN, tmpObjs_, and whichVector. |
|
|
do the paste operation.
Implements Command. Definition at line 73 of file CommandPaste.cpp. References OSGWindows::doAddGeode(), osgwind_, and pastedObjs_. |
|
|
undo the paste operation.
Implements Command. Definition at line 87 of file CommandPaste.cpp. References OSGWindows::doDeleteGeode(), osgwind_, pastedObjs_, OSGWindows::setCutObjects(), and whichVector. |
|
|
a private variable. It is used to hold the created environmental object by using the pasted object information. Definition at line 39 of file CommandPaste.h. |
|
|
a private variable. It is used to hold the created traffic light object by using the pasted object information. Definition at line 27 of file CommandPaste.h. |
|
|
a private variable. It is initialized with the unique OSGWindows instance. Definition at line 15 of file CommandPaste.h. Referenced by CommandPaste(), execute(), and unexecute(). |
|
|
a private vector of TraffEduObjects. It holds the pasted objects. Definition at line 45 of file CommandPaste.h. Referenced by CommandPaste(), execute(), and unexecute(). |
|
|
a private variable. It is used to hold the created traffic sign object by using the pasted object information. Definition at line 21 of file CommandPaste.h. Referenced by CommandPaste(). |
|
|
a private vector of TraffEduObjects. It holds the copied or cut objects beforehand. Definition at line 51 of file CommandPaste.h. Referenced by CommandPaste(). |
|
|
a private variable. It is used to hold the created vehicle object by using the pasted object information. Definition at line 33 of file CommandPaste.h. |
|
|
a private variable. It is used to show from which vector the pasted objects are coming(copied or cut). Definition at line 57 of file CommandPaste.h. Referenced by CommandPaste(), and unexecute(). |
1.4.6-NO